home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIEncodedChannel.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  140 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIEncodedChannel.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIEncodedChannel_h__
  6. #define __gen_nsIEncodedChannel_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIUTF8StringEnumerator; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIEncodedChannel */
  21. #define NS_IENCODEDCHANNEL_IID_STR "30d7ec3a-f376-4652-9276-3092ec57abb6"
  22.  
  23. #define NS_IENCODEDCHANNEL_IID \
  24.   {0x30d7ec3a, 0xf376, 0x4652, \
  25.     { 0x92, 0x76, 0x30, 0x92, 0xec, 0x57, 0xab, 0xb6 }}
  26.  
  27. /**
  28.  * A channel interface which allows special handling of encoded content
  29.  */
  30. class NS_NO_VTABLE nsIEncodedChannel : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IENCODEDCHANNEL_IID)
  34.  
  35.   /**
  36.      * This attribute holds the MIME types corresponding to the content
  37.      * encodings on the channel.  The enumerator returns nsISupportsCString
  38.      * objects.  The first one corresponds to the outermost encoding on the
  39.      * channel and then we work our way inward.  "identity" is skipped and not
  40.      * represented on the list.  Unknown encodings make the enumeration stop.
  41.      * If you want the actual Content-Encoding value, use
  42.      * getResponseHeader("Content-Encoding").
  43.      *
  44.      * When there is no Content-Encoding header, this property is null.
  45.      *
  46.      * Modifying the Content-Encoding header on the channel will cause
  47.      * this enumerator to have undefined behavior.  Don't do it.
  48.      *
  49.      * Also note that contentEncodings only exist during or after OnStartRequest.
  50.      * Calling contentEncodings before OnStartRequest is an error.
  51.      */
  52.   /* readonly attribute nsIUTF8StringEnumerator contentEncodings; */
  53.   NS_IMETHOD GetContentEncodings(nsIUTF8StringEnumerator * *aContentEncodings) = 0;
  54.  
  55.   /**
  56.      * This attribute controls whether or not content conversion should be
  57.      * done per the Content-Encoding response header.  applyConversion can only 
  58.      * be set before or during OnStartRequest.  Calling this during 
  59.      * OnDataAvailable is an error. 
  60.      *
  61.      * TRUE by default.
  62.      */
  63.   /* attribute boolean applyConversion; */
  64.   NS_IMETHOD GetApplyConversion(PRBool *aApplyConversion) = 0;
  65.   NS_IMETHOD SetApplyConversion(PRBool aApplyConversion) = 0;
  66.  
  67. };
  68.  
  69. /* Use this macro when declaring classes that implement this interface. */
  70. #define NS_DECL_NSIENCODEDCHANNEL \
  71.   NS_IMETHOD GetContentEncodings(nsIUTF8StringEnumerator * *aContentEncodings); \
  72.   NS_IMETHOD GetApplyConversion(PRBool *aApplyConversion); \
  73.   NS_IMETHOD SetApplyConversion(PRBool aApplyConversion); 
  74.  
  75. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  76. #define NS_FORWARD_NSIENCODEDCHANNEL(_to) \
  77.   NS_IMETHOD GetContentEncodings(nsIUTF8StringEnumerator * *aContentEncodings) { return _to GetContentEncodings(aContentEncodings); } \
  78.   NS_IMETHOD GetApplyConversion(PRBool *aApplyConversion) { return _to GetApplyConversion(aApplyConversion); } \
  79.   NS_IMETHOD SetApplyConversion(PRBool aApplyConversion) { return _to SetApplyConversion(aApplyConversion); } 
  80.  
  81. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  82. #define NS_FORWARD_SAFE_NSIENCODEDCHANNEL(_to) \
  83.   NS_IMETHOD GetContentEncodings(nsIUTF8StringEnumerator * *aContentEncodings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentEncodings(aContentEncodings); } \
  84.   NS_IMETHOD GetApplyConversion(PRBool *aApplyConversion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplyConversion(aApplyConversion); } \
  85.   NS_IMETHOD SetApplyConversion(PRBool aApplyConversion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetApplyConversion(aApplyConversion); } 
  86.  
  87. #if 0
  88. /* Use the code below as a template for the implementation class for this interface. */
  89.  
  90. /* Header file */
  91. class nsEncodedChannel : public nsIEncodedChannel
  92. {
  93. public:
  94.   NS_DECL_ISUPPORTS
  95.   NS_DECL_NSIENCODEDCHANNEL
  96.  
  97.   nsEncodedChannel();
  98.  
  99. private:
  100.   ~nsEncodedChannel();
  101.  
  102. protected:
  103.   /* additional members */
  104. };
  105.  
  106. /* Implementation file */
  107. NS_IMPL_ISUPPORTS1(nsEncodedChannel, nsIEncodedChannel)
  108.  
  109. nsEncodedChannel::nsEncodedChannel()
  110. {
  111.   /* member initializers and constructor code */
  112. }
  113.  
  114. nsEncodedChannel::~nsEncodedChannel()
  115. {
  116.   /* destructor code */
  117. }
  118.  
  119. /* readonly attribute nsIUTF8StringEnumerator contentEncodings; */
  120. NS_IMETHODIMP nsEncodedChannel::GetContentEncodings(nsIUTF8StringEnumerator * *aContentEncodings)
  121. {
  122.     return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124.  
  125. /* attribute boolean applyConversion; */
  126. NS_IMETHODIMP nsEncodedChannel::GetApplyConversion(PRBool *aApplyConversion)
  127. {
  128.     return NS_ERROR_NOT_IMPLEMENTED;
  129. }
  130. NS_IMETHODIMP nsEncodedChannel::SetApplyConversion(PRBool aApplyConversion)
  131. {
  132.     return NS_ERROR_NOT_IMPLEMENTED;
  133. }
  134.  
  135. /* End of implementation class template. */
  136. #endif
  137.  
  138.  
  139. #endif /* __gen_nsIEncodedChannel_h__ */
  140.